import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.lang.reflect.Field;

public class Main {

    public static void main(String[] arsg) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        MoAttack moAttack = (MoAttack) ctx.getBean("moAttackbean");
        Class moAttackclass = moAttack.getClass();
        System.out.println("moAttackbean实例化所用的类："+moAttackclass.getName());
        Field fields[ ] = moAttackclass.getDeclaredFields();
        System.out.println(fields[0]);
        moAttack.cityGateAsk();
    }
}
